// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://ekoindri.com/radphp/research/soap_sis_ruang.php?wsdl
//  >Import : http://ekoindri.com/radphp/research/soap_sis_ruang.php?wsdl>0
// Encoding : ISO-8859-1
// Version  : 1.0
// (12/30/2011 7:22:50 PM - - $Rev: 28374 $)
// ************************************************************************ //

unit soap_sis_ruang;

interface

uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;

type

  // ************************************************************************ //
  // The following types, referred to in the WSDL document are not being represented
  // in this file. They are either aliases[@] of other types represented or were referred
  // to but never[!] declared in the document. The types from the latter category
  // typically map to predefined/known XML or Embarcadero types; however, they could also 
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:integer         - "http://www.w3.org/2001/XMLSchema"[Gbl]

  TInfoServer          = class;                 { "http://localhost"[GblCplx] }
  TInfoRuang           = class;                 { "http://localhost"[GblCplx] }



  // ************************************************************************ //
  // XML       : TInfoServer, global, <complexType>
  // Namespace : http://localhost
  // ************************************************************************ //
  TInfoServer = class(TRemotable)
  private
    Fserver_host: string;
    Fserver_database: string;
    Fserver_username: string;
    Fserver_password: string;
  published
    property server_host:     string  read Fserver_host write Fserver_host;
    property server_database: string  read Fserver_database write Fserver_database;
    property server_username: string  read Fserver_username write Fserver_username;
    property server_password: string  read Fserver_password write Fserver_password;
  end;



  // ************************************************************************ //
  // XML       : TInfoRuang, global, <complexType>
  // Namespace : http://localhost
  // ************************************************************************ //
  TInfoRuang = class(TRemotable)
  private
    FID: Int64;
    FRUANG_KODE: string;
    FRUANG_NAMA: string;
    FRUANG_JENIS: string;
    FRUANG_KAPASITAS: Int64;
    FRUANG_GEDUNG: string;
    FRUANG_KETERANGAN: string;
  published
    property ID:               Int64   read FID write FID;
    property RUANG_KODE:       string  read FRUANG_KODE write FRUANG_KODE;
    property RUANG_NAMA:       string  read FRUANG_NAMA write FRUANG_NAMA;
    property RUANG_JENIS:      string  read FRUANG_JENIS write FRUANG_JENIS;
    property RUANG_KAPASITAS:  Int64   read FRUANG_KAPASITAS write FRUANG_KAPASITAS;
    property RUANG_GEDUNG:     string  read FRUANG_GEDUNG write FRUANG_GEDUNG;
    property RUANG_KETERANGAN: string  read FRUANG_KETERANGAN write FRUANG_KETERANGAN;
  end;

  TInfoDaftarRuang = array of TInfoRuang;       { "http://localhost"[GblCplx] }

  // ************************************************************************ //
  // Namespace : http://localhost/
  // soapAction: http://ekoindri.com/radphp/research/soap_sis_ruang.php/%operationName%
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : rpc
  // binding   : SERVICE_RUANGBinding
  // service   : SERVICE_RUANG
  // port      : SERVICE_RUANGPort
  // URL       : http://ekoindri.com/radphp/research/soap_sis_ruang.php
  // ************************************************************************ //
  SERVICE_RUANGPortType = interface(IInvokable)
  ['{A64B0836-A788-4170-3098-0F7143FF4FA0}']
    function  RUANG_SIMPAN(const connection_string: TInfoServer; const ruang: TInfoRuang; const status: string): string; stdcall;
    function  RUANG_SIMPAN_DATASET(const connection_string: TInfoServer; const daftarruang: TInfoDaftarRuang): string; stdcall;
    function  RUANG_DATA(const connection_string: TInfoServer; const row: Int64; const key_word: string; const sort_type: string): TInfoDaftarRuang; stdcall;
    function  RUANG_DATA_SEMUA(const connection_string: TInfoServer; const sort_type: string): TInfoDaftarRuang; stdcall;
    function  RUANG_HAPUS(const connection_string: TInfoServer; const id: Int64): string; stdcall;
  end;

function GetSERVICE_RUANGPortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): SERVICE_RUANGPortType;


implementation
  uses SysUtils;

function GetSERVICE_RUANGPortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): SERVICE_RUANGPortType;
const
  defWSDL = 'http://ekoindri.com/radphp/research/soap_sis_ruang.php?wsdl';
  defURL  = 'http://ekoindri.com/radphp/research/soap_sis_ruang.php';
  defSvc  = 'SERVICE_RUANG';
  defPrt  = 'SERVICE_RUANGPort';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as SERVICE_RUANGPortType);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;


initialization
  InvRegistry.RegisterInterface(TypeInfo(SERVICE_RUANGPortType), 'http://localhost/', 'ISO-8859-1');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(SERVICE_RUANGPortType), 'http://ekoindri.com/radphp/research/soap_sis_ruang.php/%operationName%');
  RemClassRegistry.RegisterXSClass(TInfoServer, 'http://localhost', 'TInfoServer');
  RemClassRegistry.RegisterXSClass(TInfoRuang, 'http://localhost', 'TInfoRuang');
  RemClassRegistry.RegisterXSInfo(TypeInfo(TInfoDaftarRuang), 'http://localhost', 'TInfoDaftarRuang');

end.